package com.wwg;

public class Mail implements Cloneable {

    //称谓
    private String appellation;
    //内容
    private String content;
    //收件人
    private String receive;
    //名称
    private String subject;
    //邮件尾部
    private String tail;

    public Mail (AdvTemplate advTemplate){

        //设置邮件模版的内容
        this.content = advTemplate.getAdvContext();
        //设置邮件的名称
        this.subject = advTemplate.getAdvSubject();

    }

    /**
     * 克隆对象
     * @return
     * @throws CloneNotSupportedException
     */
    @Override
    protected Object clone() throws CloneNotSupportedException {

        Mail mail = null;
        try {
            mail = (Mail) super.clone();
        }catch (Exception e){
            e.printStackTrace();
        }

        return mail;
    }

    public String getTail() {
        return tail;
    }

    public void setTail(String tail) {
        this.tail = tail;
    }

    public String getAppellation() {
        return appellation;
    }

    public void setAppellation(String appellation) {
        this.appellation = appellation;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getReceive() {
        return receive;
    }

    public void setReceive(String receive) {
        this.receive = receive;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }
}
